package com.bdqn.bookshop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bdqn.bookshop.entity.Guide;
import com.bdqn.bookshop.utils.DataGridViewResult;
import com.bdqn.bookshop.utils.Result;
import com.bdqn.bookshop.vo.GuideVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface GuideService extends IService<Guide> {
    /**
     * 指南内容存储
     * @param file
     * @param request
     * @return
     */
    Map<String, Object> uploadImage(MultipartFile file, HttpServletRequest request);

    /**
     * 添加指南
     * @param guide
     * @param request
     * @return
     */
    Result addGuide(Guide guide, HttpServletRequest request);

    /**
     * 修改指南
     * @param guide
     * @param request
     * @return
     */
    Result updateGuide(Guide guide, HttpServletRequest request);

    /**
     * 删除指南
     * @param id
     * @return
     */
    Result deleteById(Integer id);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Result batchDelete(String ids);

    /**
     * 分页查询数据
     * @param guideVo
     * @return
     */
    DataGridViewResult guideList(GuideVo guideVo);

    /**
     * 查询列表
     * @return
     */
    List<Guide> getGuideList();


    /**
     * 首页获取4个新手指南
     * @return
     */
    List<Guide> getFourGuieList();

}
